<template>
	<view>
		<!-- 头像信息 -->
		<uni-card>
			<view class="">
				<view class="main">
					<image :src="upkeepInfo.avatar" mode=""></image>
					<view class="main-time co3D">
						<text style="margin-right: 15px;">{{upkeepInfo.startTime}}</text>
						开始保养
					</view>

				</view>
				<view class="main-bottom">
					<view class="content disat">
						<text class="f16 co3D" v-if="upkeepInfo.upkeepType == 1">半月保养</text>
						<text class="f16 co3D" v-if="upkeepInfo.upkeepType == 2">季度保养</text>
						<text class="f16 co3D" v-if="upkeepInfo.upkeepType == 3">半年保养</text>
						<text class="f16 co3D" v-if="upkeepInfo.upkeepType == 4">年度保养</text>
						<view class="diats">
							<image style="width: 15px;height: 15px;border-radius: 50%;" src="../../../static/image/maintainOver/timepiece.png"
							 mode=""></image>
							<text class="f14 co98 ml15">{{upkeepInfo.upkeepDate}}</text>
						</view>
					</view>
					<view class="content f12">
						{{upkeepInfo.elevatorName}}
					</view>
				</view>
			</view>
		</uni-card>


		<!-- 签名 -->
		<uni-card>
			<view class="">
				<view class="successRight">
					<view class="x-m-con">
						<image class="mycanvas" :src="upkeepInfo.referUserSign" mode=""></image>
					</view>
					<view class="successt"></view>
				</view>

				<view class="submitOrder">
					<text>提交人:{{upkeepInfo.referUser}}</text>
					<text>{{upkeepInfo.referTime}}</text>
				</view>
			</view>
		</uni-card>
		<uni-card>
			<view class="">
				<view class="successRight">
					<view class="x-m-con">
						<image class="mycanvas" :src="upkeepInfo.auditUserSign" mode=""></image>
					</view>
					<view class="success" v-show="flag== true" >
						<image src="../../../static/image/icon_confirmcomplete.png" mode=""></image>
						<text>通过</text>
					</view>
				</view>
		
				<view class="submitOrder">
					<text>审核人:{{upkeepInfo.auditUser}}</text>
					<text>{{upkeepInfo.auditTime}}</text>
				</view>
			</view>
		</uni-card>
	</view>
</template>

<script>
import {getUpkeepDetail} from "@/api/iot/upkeepInfo";

export default {
		data() {
			return {
				//维修  
				flag: true,
				upkeepId: '',
				upkeepInfo: '',

			}
		},
		onLoad(e) {
			this.upkeepId = e.upkeepId;
			this.getMachineList()
		},
		methods: {
			
			//查询保养清单页面详情接口
			async getMachineList(idn) {
        this.upkeepInfo = await getUpkeepDetail(this.upkeepId, null)
				// console.log(res.data.data.projectList)
			},
		}
	}
</script>

<style scoped>
	* {
		margin: 0;
		padding: 0;
	}

	page {
		background: #EFF2F5;
	}

	view {
		font-size: 28rpx;
		line-height: 1.8;

	}

	.uni-card {
		width: 670rpx;
		/* height: 280rpx; */
		background: #FFFFFF;
		box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(52, 54, 61, 0.05);
		border-radius: 16rpx;
		margin: 0 auto;
		margin-top: 20rpx;
		border: none;

	}

	.main {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		border-bottom: 1rpx solid #E2E6EF;
		padding-bottom: 15rpx;
	}

	.main image {
		width: 80rpx;
		height: 80rpx;
		background: #E2E6EF;
		border: 4rpx solid #F0F3F6;
		border-radius: 50%;
		margin-right: 18rpx;

	}

	.main-time {
		font-size: 24rpx;
		color: #989BA6;
	}

	.main-time text {
		margin-left: 20rpx;
		color: #34363D;
	}

	/* 头像下面内容 */
	.main-bottom {
		margin-top: 15rpx;
	}

	.content {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		font-size: 30rpx;
		font-weight: 400;
		color: #989BA6;

	}

	.content text {
		font-weight: 400;
		color: #34363D;
	}

	.alarm image {
		width: 24rpx;
		height: 24rpx;
		vertical-align: middle;
		margin-right: 10rpx;
	}

	.alarm text {
		font-size: 24rpx;
		color: #34363D;

	}

	.address {
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #989BA6;
	}

	/* 故障描述 */
	.record {
		font-family: PingFang SC;
		font-weight: 400;

	}

	.record-div {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: flex-start;
		align-items: center;
		padding: 0 20rpx;
		word-spacing: 10rpx;
		margin-bottom: 15rpx;
		border-bottom: 1px solid #E2E6EF;
	}

	.record-address {
		font-size: 30rpx;
		color: #34363D;
		margin-bottom: 10rpx;
		font-weight: 400;
		line-height: 50rpx;

	}

	.record-address view {
		margin-bottom: 10rpx;
	}

	.record-state {
		font-size: 30rpx;
		color: #017EFE;
	}

	.record-time {
		font-size: 24rpx;
		color: #989BA6;

	}

	/* 微修 */
	/* 画布 */

	.mycanvas {
		/* width: 100%; */
		width: 255rpx;
		height: 151rpx;
		/* height: calc(100vh - 1200upx); */
		background-color: #ECECEC;
	}

	.x-m-con {
		width: 255rpx;
		/* height: 151rpx; */
		margin: 0 auto;
	}
	.successt {
		width: 150rpx;
		height: 56rpx;
	}
	.success {
		width: 150rpx;
		height: 56rpx;
		background: #017EFE;
		box-shadow: 0px 5px 10px 0px rgba(1, 126, 254, 0.2);
		border-radius: 28px;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.success image {
		width: 24rpx;
		height: 24rpx;
		margin-right: 15rpx;
	}

	.success text {
		color: #FFFFFF;
	}

	.successRight {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.submitOrder {
		padding: 0 20rpx;
		word-spacing: 10rpx;

	}

	.submitOrder text {
		margin: 0 10rpx;
	}

	.f16 {
		font-size: 16px;
	}

	.co3D {
		color: #34363D;
	}

	.disat {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.f14 {
		font-size: 14px;
	}

	.f12 {
		font-size: 12px;
	}

	.co98 {
		color: #989BA6;
	}

	.diats {
		display: flex;
		align-items: center;
	}

	.ml15 {
		margin-left: 8px;
	}
</style>
